# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models

# Create your models here.
class RoomType(models.Model):
    name = models.CharField(u'房间类型', max_length=20)
    type_num = models.IntegerField(u'类型编号')
    price = models.CharField(u'价格', max_length=20)

    class Meta:
        verbose_name = u'房间类型'
        verbose_name_plural = verbose_name
        

RoomStatus = {
    1: '空闲',
    2: '预定',
    3: '清理中',
    4: '维修中',
    5: '入住'
}


class Room(models.Model):
    floor = models.IntegerField(u'楼层')
    num = models.CharField(u'房间号', default='', max_length=10)
    status = models.IntegerField(u'房间状态')
    people_num = models.IntegerField(u'入住人数')
    type =  models.IntegerField(u'房间类型')
    is_book = models.IntegerField(default=0)
    time = models.DateTimeField(auto_now=True)

    class Meta:
        verbose_name = u'房间信息'
        verbose_name_plural = verbose_name
    
class HotTime(models.Model):
    type_num = models.IntegerField(u'房间类型编号')
    s_time = models.DateTimeField(u'开始时间')
    e_time = models.DateTimeField(u'结束时间')
    price = models.CharField(u'价格', max_length=20)
